package com.zengjianjun.canal.demo.annotation.processor;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 自定义注解处理器
 *
 * @author zengjianjun
 */
@Slf4j
@Component
public class CustomAnnotationProcessor {

    @Resource
    private CanalListenerAnnotationProcessor canalListenerProcessor;

    @EventListener(ContextRefreshedEvent.class)
    public void onApplicationEvent(ContextRefreshedEvent event) {
        canalListenerProcessor.processor();
    }
}
